from .conn_mysql import ConnectMysql

class ApiMysql(ConnectMysql):

    def __init__(self):
        super().__init__()

    def open_id(self,openid):
        '''Look up all the information in the openid table,
        parameter: the user corresponds to openid'''

        sql = 'select * from openid where openid=%s'

        result_info = self.select_one(sql, (openid,))

        print(result_info)

        return result_info

    def company_info(self, company_id):
        '''Present the data in the company table'''

        sql = 'select * from company where id = %s'

        result_info = self.select_one(sql, (company_id))

        return result_info

